package com.example.obtaingaode.di;

import com.example.obtaingaode.net.MApi;


import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import frame.m.com.mylibrary.http.HttpUtil;
import frame.m.com.mylibrary.http.RetrofitUtil;

/**
 * Created by Administrator on 2017/9/6.
 */

@Module
public class MAPiModule {
    @Singleton
    @Provides
    public MApi provideApi() {
        return new RetrofitUtil<MApi>().getAPI(MApi.class);
    }

    @Provides
    public RetrofitUtil<MApi> provideRetrofitUtil() {
        return new RetrofitUtil<>();
    }

    @Singleton
    @Provides
    public HttpUtil provideHttpUtil() {
        return HttpUtil.getInstance();
    }


}
